<?php defined('_JEXEC') or die('Restricted access'); 
$TableName = JRequest::getCmd('table');
JHTML::_('behavior.tooltip');
jimport('joomla.html.pane');
JHTML::_('behavior.formvalidation');
$pane =& JPane::getInstance('tabs', array('startOffset'=>0)); 

//print_r($this->user);

?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
	var form = document.adminForm;
	/*var type = form.type.value;*/

	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	if ( document.getElementById('name').value == "") {
		alert( "Item must have a Title" );
	}
				else if( document.getElementById('parent').value == 0 ){
 		alert( "Please select a Category" );
	} 	
				else if( document.getElementById('cyid').value == 0 ){
 		alert( "Please select a Country" );
	} 
				else if( document.getElementById('sid').value == 0 ){
 		alert( "Please select a State" );
	} 
				else if( document.getElementById('lid').value == 0 ){
 		alert( "Please select a Locality" );
	} 
				 else {
		submitform( pressbutton );
	}
}
//-->
</script>

<script type="text/javascript">
<!--
	Window.onDomReady(function(){
		document.formvalidator.setHandler('passverify', function (value) { return ($('password').value == value); }	);
	});
// -->
</script>
<script type="text/javascript">
function ChangeState(a){
var progressS = $('progressS');
new Ajax("<?php echo JURI::base();?>index.php?option=com_properties&controller=ajax&format=raw&task=ChangeState",
{method: 'get',
onRequest: function(){progressS.setStyle('visibility', 'visible');},
onComplete: function(){progressS.setStyle('visibility', 'hidden');},
update: $('AjaxState'), 
data: 'Country_id='+a}).request();
			}	
			
function ChangeLocality(a){
var progressL = $('progressL');
new Ajax("<?php echo JURI::base();?>index.php?option=com_properties&controller=ajax&format=raw&task=ChangeLocality",
{method: 'get',
onRequest: function(){progressL.setStyle('visibility', 'visible');},
onComplete: function(){progressL.setStyle('visibility', 'hidden');},
update: $('AjaxLocality'), 
data: 'State_id='+a}).request();
			}
function ChangeAgent(a){
var progressA = $('progressA');
new Ajax("<?php echo JURI::base();?>index.php?option=com_properties&controller=ajax&format=raw&task=ChangeAgent",
{method: 'get',
onRequest: function(){progressA.setStyle('visibility', 'visible');},
onComplete: function(){progressA.setStyle('visibility', 'hidden');},
update: $('AjaxAgent'), 
data: 'agent_id='+a}).request();
			}		
</script>
<form action="index.php" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<input type="hidden" id="agent_id" name="agent_id" value="<?php echo $this->user->id; ?>" />
<input type="hidden" id="agent" name="agent" value="<?php echo $this->user->username; ?>" />
<?php $listdate = $this->datos->listdate ? date("Y-m-d") : $this->datos->listdate;?>
<input type="hidden" id="listdate" name="listdate" value="<?php echo $listdate; ?>" />

<?php echo date('d-m-Y', strtotime($listdate)); ?>
<div class="col width-100">
<?php
echo $pane->startPane( 'pane' );
echo $pane->startPanel( 'Details', 'panel1' );
?>
	<fieldset class="adminform">    
	<legend><?php echo JText::_( 'Details' ); ?></legend>
				<table class="admintable" border="0">
				<tr>
					<td class="key"><label for="name"><?php echo JText::_( 'Reference' ); ?>:</label></td>
					<td colspan="2">
						<input class="text_area" type="text" name="ref" id="ref" size="60" maxlength="255" value="<?php echo $this->datos->ref; ?>" />					</td>
			      </tr>
                <tr>
					<td class="key"><label for="name"><?php echo JText::_( 'Title' ); ?>:</label></td>
					<td colspan="2">
                        
                        <textarea class="inputbox required" name="name" id="name"  cols="34" rows="3"><?php echo $this->datos->name; ?></textarea>					</td>
			      </tr>
                  
                  			<tr>
			<td width="100" align="right" class="key">
				<label for="name">
							<?php echo JText::_( 'Alias' ); ?>:
						</label>
			</td>
			<td>
				<input class="text_area" type="text" name="alias" id="alias" size="60" maxlength="250" value="<?php echo $this->datos->alias;?>" />
			</td>
		</tr> 
        
        
				<tr>
					<td class="key"><label for="name"><?php echo JText::_( 'Type' ); ?>:</label></td>
					<td width="260" >
                     <?php echo SelectHelper::SelectType( $this->datos,'type',$this->datos->type); ?>						</td>
				    <td width="50" >&nbsp;</td>
				</tr>
				
                
                <tr>        
<td width="100" align="right" class="key">
		<label for="name"><?php echo JText::_( 'Category' ); ?>:</label>			</td>
<td>
<?php echo CatTreeHelper::Parent( $this->datos,'category','products' ); ?></td>
		<td>&nbsp;</td>
                </tr> 
   			<tr>        
<td width="100" align="right" class="key">
		<label for="name"><?php echo JText::_( 'Varies Categories' ); ?>:</label>			</td>
<td>

<?php echo CatTreeHelper::MultiParent( $this->datos,'category' ); ?></td>
		<td>&nbsp;</td>
   			</tr>       
        
<tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Country' ); ?>:</label></td>
					<td>
                    <?php echo SelectHelper::SelectAjaxPaises( $this->datos,'country',$this->datos->cyid); ?>                </td>   
				    <td rowspan="3"><div id="progressccc"></div></td>
<tr>                
      <td class="key"><label for="catid"><?php echo JText::_( 'State' ); ?>:</label></td>
		<td>
          <div id="AjaxState" style="float:left">
<input type="hidden" name="sid" id="sid" value="<?php echo $this->datos->sid; ?>" />
			  <?php echo $this->datos->name_state;?></div><div id="progressS"></div></td>
        <td width="56">
		  <?php echo JHTML::_('tooltip', JText::_( 'Change Country, State and after, Locality.' )); ?>	    </td>
				</tr>
				<tr><td class="key"><?php echo JText::_( 'Locality' ); ?>:</td>
					<td>
	        <div id="AjaxLocality" style="float:left">     
            <input type="hidden" name="lid" id="lid" value="<?php echo $this->datos->lid; ?>" />      
   <?php                      
 echo $this->datos->name_locality;
?>                       
  </div>	<div id="progressL"></div>				</td>
			      </tr>
                <tr><td class="key"><?php echo JText::_( 'Adress' ); ?>:</td>
					<td colspan="2">
						<input class="text_area" type="text" name="adress" id="adress" size="60" maxlength="255" value="<?php echo $this->datos->adress; ?>" />					</td>
			      </tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Zip Code' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="postcode" id="postcode" size="10" maxlength="255" value="<?php echo $this->datos->postcode; ?>" />					</td>
				    <td >&nbsp;</td>
                </tr>
  
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Featured' ); ?>:</label></td>
					<td >
<?php $chequeado0 = $this->datos->featured ? JText::_( '' ) : JText::_( 'checked="checked"' );?>
<?php $chequeado1 = $this->datos->featured ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
                    <input name="featured" id="featured0" value="0" <?php echo $chequeado0;?> type="radio">
	<label for="featured0"><?php echo JText::_( 'No' ); ?></label>
	<input name="featured" id="featured1" value="1" <?php echo $chequeado1;?> type="radio">
	<label for="featured1"><?php echo JText::_( 'Yes' ); ?></label>					</td>
				    <td >&nbsp;</td>
                </tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Published' ); ?>:</label></td>
					<td >
<?php $chequeado0 = $this->datos->published ? JText::_( '' ) : JText::_( 'checked="checked"' );?>
<?php $chequeado1 = $this->datos->published ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
                    <input name="published" id="published0" value="0" <?php echo $chequeado0;?> type="radio">
	<label for="published0"><?php echo JText::_( 'No' ); ?></label>
	<input name="published" id="published1" value="1" <?php echo $chequeado1;?> type="radio">
	<label for="published1"><?php echo JText::_( 'Yes' ); ?></label>					</td>
				    <td >&nbsp;</td>
                </tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Details Market' ); ?>:</label></td>
					<td >
                                       
<?php 
if($this->datos->available == 0){$select0 = JText::_( 'selected="selected"' );}
if($this->datos->available == 1){$select1 = JText::_( 'selected="selected"' );}
if($this->datos->available == 2){$select2 = JText::_( 'selected="selected"' );}
if($this->datos->available == 3){$select3 = JText::_( 'selected="selected"' );}
if($this->datos->available == 4){$select4 = JText::_( 'selected="selected"' );}
if($this->datos->available == 5){$select5 = JText::_( 'selected="selected"' );}
if($this->datos->available == 6){$select6 = JText::_( 'selected="selected"' );}
?>
                   
         <select name="available" style="width:150px;"> 
			<option <?php echo $select0;?> value="0"><?php echo JText::_( 'DETAILS_MARKET0' ); ?></option>
            <option <?php echo $select1;?> value="1"><?php echo JText::_( 'DETAILS_MARKET1' ); ?></option>
            <option <?php echo $select2;?> value="2"><?php echo JText::_( 'DETAILS_MARKET2' ); ?></option>
            <option <?php echo $select3;?> value="3"><?php echo JText::_( 'DETAILS_MARKET3' ); ?></option>
            <option <?php echo $select4;?> value="4"><?php echo JText::_( 'DETAILS_MARKET4' ); ?></option>
            <option <?php echo $select5;?> value="5"><?php echo JText::_( 'DETAILS_MARKET5' ); ?></option>
            <option <?php echo $select6;?> value="6"><?php echo JText::_( 'DETAILS_MARKET6' ); ?></option>
         </select>					</td>
				    <td >&nbsp;</td>
                </tr>
                 <tr>
                    <td class="key"><label>
								<?php echo JText::_( 'Upload Panoramic' ); ?>:
							</label></td>
                    <td colspan="2">
                    <input class="input_box" id="panoramic" name="panoramic" size="43" type="file" />                    </td>
                    <td><?php echo JHTML::_('tooltip', JText::_( 'TOOLTIP_CHANGE_PANORAMIC')); ?></td>
                    </tr>
				<tr>
					<td class="key"><label for="image"><?php echo JText::_( 'Image' ); ?>:</label></td>
					<td >
                   <?php 
				  
			$img_path = $mainframe->getSiteURL() .'images/properties/'.$this->datos->image1;
			
			
			?>
<span class="editlinktip hasTip" title="<?php echo $this->datos->image1;?>::
<img border=&quot;1&quot; src=&quot;<?php echo $img_path; ?>&quot; name=&quot;imagelib&quot; alt=&quot;<?php echo JText::_( 'No preview available'.$img_path ); ?>&quot; width=&quot;206&quot; height=&quot;145&quot; />">
<a class="modal" rel="{handler: 'iframe', size: {x: 640, y: 480}}" href="<?php echo $img_path; ?>"><?php echo $this->datos->image1; ?></a></span>					</td>
				    <td >&nbsp;</td>
				</tr>	
                	
                    <tr>
					<td class="key"><label for="image"><?php echo JText::_( 'Panoramic' ); ?>:</label></td>
					<td >
                   <?php 
				 
			$img_path = $mainframe->getSiteURL() .'images/properties/panoramics/'.$this->datos->panoramic;?>
<span class="editlinktip hasTip" title="<?php echo $this->datos->image1;?>::
<img border=&quot;1&quot; src=&quot;<?php echo $img_path; ?>&quot; name=&quot;imagelib&quot; alt=&quot;<?php echo JText::_( 'No preview available'.$img_path ); ?>&quot; width=&quot;206&quot; height=&quot;100&quot; />">
<a class="modal" rel="{handler: 'iframe', size: {x: 640, y: 480}}" href="<?php echo $img_path; ?>"><?php echo $this->datos->panoramic; ?></a></span>					</td>
				    <td >&nbsp;</td>
                  </tr>	
                		
				<?php
				if ($this->datos->id) {
					?>
					<tr>
						<td class="key">
							<label>
								<?php echo JText::_( 'ID' ); ?>:							</label>						</td>
						<td>
							<strong><?php echo $this->datos->id;?></strong>						</td>
					    <td>&nbsp;</td>
					</tr> 
					<?php
				}
				?>
                <tr>
					<td class="key">
						<label for="name">
							<?php echo JText::_( 'Clave' ); ?>:						</label>					</td>
					<td >
						<input class="text_area" type="text" name="clave" id="clave" size="20" maxlength="255" value="<?php echo $this->datos->clave; ?>" />					</td>
				    <td >&nbsp;</td>
 </tr>     


<tr>
					<td  class="key"><label for="name"><?php echo JText::_( 'Agent' ); ?>:</label></td>
					<td>
                    <div style="float:left;">
						 <?php echo SelectHelper::SelectAgent( $this->datos,'users',$this->datos->cid); ?>                        </div>                         
					
                    <div id="progressA"></div>  </td>
                    
				    <td>&nbsp;</td>
</tr>  
        <tr>
					<td class="key">
						<label for="name">
							<?php echo JText::_( 'Name' ); ?>:						</label>					</td>
					<td >
						<div style="float:left; margin-left:10px; " id="AjaxAgent"></div>					</td>
				    <td >&nbsp;</td>
        </tr>  
				</table>
  </fieldset>  
<?php 
echo $pane->endPanel();
echo $pane->startPanel( 'Features', 'panel2' );
?>
	<fieldset class="adminform">    
	<legend><?php echo JText::_( 'Caractristics' ); ?></legend>
				<table class="admintable">
              <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Description' ); ?>:</label></td>
					<td >
                    <textarea class="text_area" name="description" cols="35" rows="10"><?php echo $this->datos->description; ?></textarea>
                    						
					</td>
                    <td><?php echo JHTML::_('tooltip', JText::_( 'Description.')); ?></td>
				</tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Price' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="price" id="price" size="10" maxlength="255" value="<?php echo $this->datos->price; ?>" />						
					</td>
				</tr>                
                                
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Years' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="years" id="years" size="3" maxlength="255" value="<?php echo $this->datos->years; ?>" />						
					</td>
				</tr>
                 <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Bedrooms' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="bedrooms" id="bedrooms" size="3" maxlength="255" value="<?php echo $this->datos->bedrooms; ?>" />						
					</td>
				</tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Bathrooms' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="bathrooms" id="bathrooms" size="3" maxlength="255" value="<?php echo $this->datos->bathrooms; ?>" />						
					</td>
				</tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Garage' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="garage" id="garage" size="3" maxlength="255" value="<?php echo $this->datos->garage; ?>" />						
					</td>
                    <td>
					<?php echo JHTML::_('tooltip', JText::_( 'Total cars in garage.' )); ?>
					
					</td>
				</tr>     
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Total Area' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="area" id="area" size="3" maxlength="255" value="<?php echo $this->datos->area; ?>" />						
					</td>
				</tr>
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Covered Area' ); ?>:</label></td>
					<td>
                    <input class="text_area" type="text" name="covered_area" id="covered_area" size="3" maxlength="255" value="<?php echo $this->datos->covered_area; ?>" />						
					</td>
				</tr>                
<?php
$extra[1]=$this->datos->extra1;
$extra[2]=$this->datos->extra2;
$extra[3]=$this->datos->extra3;
$extra[4]=$this->datos->extra4;
$extra[5]=$this->datos->extra5;
$extra[6]=$this->datos->extra6;
$extra[7]=$this->datos->extra7;
$extra[8]=$this->datos->extra8;
$extra[9]=$this->datos->extra9;
$extra[10]=$this->datos->extra10;
$extra[11]=$this->datos->extra11;
$extra[12]=$this->datos->extra12;
$extra[13]=$this->datos->extra13;
$extra[14]=$this->datos->extra14;
$extra[15]=$this->datos->extra15;
$extra[16]=$this->datos->extra16;
$extra[17]=$this->datos->extra17;
$extra[18]=$this->datos->extra18;
$extra[19]=$this->datos->extra19;
$extra[20]=$this->datos->extra20;

for ($x=1;$x<11;$x++){
echo '<tr>
	<td class="key"><label for="extra">'. JText::_( 'extra'.$x ).'</label></td>
<td>
';
$chequeado0 = $extra[$x] ? JText::_( '' ) : JText::_( 'checked="checked"' );
$chequeado1 = $extra[$x] ? JText::_( 'checked="checked"' ) : JText::_( '' );
echo'
<input name="extra'.$x.'" id="extra'.$x.'" value="0" '.$chequeado0.' type="radio">
	<label for="featured0">'.JText::_( 'No' ).'</label>
	<input name="extra'.$x.'" id="extra'.$x.'1" value="1" '.$chequeado1.' type="radio">
	<label for="featured1">'.JText::_( 'Yes' ).'</label> 

</td></tr>
';
}
for ($x=11;$x<21;$x++){
echo '<tr>
	<td class="key"><label for="extra">'. JText::_( 'extra'.$x ).'</label></td>
<td><input class="text_area" type="text" name="extra'.$x.'" id="extra'.$x.'" size="20" maxlength="255" value="'.$extra[$x].'" />
</td></tr>
';
}
?>                 
				</table>
			</fieldset> 
<?php
echo $pane->endPanel();
echo $pane->startPanel( 'Images', 'panel2' );

$img_path = $mainframe->getSiteURL().'images/properties/';
$peque_path = $mainframe->getSiteURL().'images/properties/peques/';
?>
<input type="hidden" name="borrar" id="borrar" value="" />     
<fieldset class="adminform">
				<legend><?php echo JText::_( Images ); ?></legend>
<table class="admintable">
<tr>
	<td >    
		
<?php 
$img_dato[1]=$this->datos->image1;
$img_dato[2]=$this->datos->image2;
$img_dato[3]=$this->datos->image3;
$img_dato[4]=$this->datos->image4;
$img_dato[5]=$this->datos->image5;
$img_dato[6]=$this->datos->image6;
$img_dato[7]=$this->datos->image7;
$img_dato[8]=$this->datos->image8;
$img_dato[9]=$this->datos->image9;
$img_dato[10]=$this->datos->image10;
$img_dato[11]=$this->datos->image11;
$img_dato[12]=$this->datos->image12;
$img_dato[13]=$this->datos->image13;
$img_dato[14]=$this->datos->image14;
$img_dato[15]=$this->datos->image15;
$img_dato[16]=$this->datos->image16;
$img_dato[17]=$this->datos->image17;
$img_dato[18]=$this->datos->image18;
$img_dato[19]=$this->datos->image19;
$img_dato[20]=$this->datos->image20;
$img_dato[21]=$this->datos->image21;
$img_dato[22]=$this->datos->image22;
$img_dato[23]=$this->datos->image23;
$img_dato[24]=$this->datos->image24;

$img_des[1]=$this->datos->image1desc;
$img_des[2]=$this->datos->image2desc;
$img_des[3]=$this->datos->image3desc;
$img_des[4]=$this->datos->image4desc;
$img_des[5]=$this->datos->image5desc;
$img_des[6]=$this->datos->image6desc;
$img_des[7]=$this->datos->image7desc;
$img_des[8]=$this->datos->image8desc;
$img_des[9]=$this->datos->image9desc;
$img_des[10]=$this->datos->image10desc;
$img_des[11]=$this->datos->image11desc;
$img_des[12]=$this->datos->image12desc;
$img_des[13]=$this->datos->image13desc;
$img_des[14]=$this->datos->image14desc;
$img_des[15]=$this->datos->image15desc;
$img_des[16]=$this->datos->image16desc;
$img_des[17]=$this->datos->image17desc;
$img_des[18]=$this->datos->image18desc;
$img_des[19]=$this->datos->image19desc;
$img_des[20]=$this->datos->image20desc;
$img_des[21]=$this->datos->image21desc;
$img_des[22]=$this->datos->image22desc;
$img_des[23]=$this->datos->image23desc;
$img_des[24]=$this->datos->image24desc;

for($z=1;$z<25;$z++){

$img_peque[$z]=$peque_path.'peque_'.$img_dato[$z];
$img=$img_path.$img_dato[$z];

?>

<div style="float:left; width:180px; height:200px; border: 1px solid #CCCCCC; margin: 5px; padding: 5px; text-align:center;">
<?php

echo '<div style="width:180px;">'.JText::_( 'Image '.$z );
if($img_dato[$z]!=''){
	
echo ' ('.$img_dato[$z]. ') </div>'; 
$rel=' rel="{handler: \'iframe\', size: {x: 640, y: 480}}"';
$style = ' style="padding: 2px;border: 1px solid grey"';		
	
echo '<a class="modal" href="'.$img.'" title="'. $row->titulo.'"  >';
echo '<img src="'. $img_peque[$z] .'" alt="'. $row->titulo.'" '.$rel.$style.' />';
echo '</a>';
?>
<br />
		<a href="javascript:void(0);" onclick="javascript: document.getElementById('borrar').value = <?php echo $z; ?>;return submitbutton('delimg');" title="<?php echo JText::_( 'Delete Image' ); ?>">
<?php echo JText::_( 'Delete' ); ?>
<img src="images/publish_x.png" alt="<?php echo JText::_( 'Delete Image' ); ?>" border="0"></a>
<?php echo '<br>'.JText::_( 'Image Description' ); ?>
<input class="text_area" type="text" name="<?php echo 'image'.$z.'desc'; ?>" id="<?php echo 'image'.$z.'desc'; ?>" size="40" maxlength="255" value="<?php echo $img_des[$z]; ?>" />	
 <?php       
 }else{
?>
</div>
<br />
<img src=<?php echo $peque_path.'noimage.jpg' .$style;?> />
<?php echo '<br>'.JText::_( 'Image Description' ); ?>
<input class="text_area" type="text" name="<?php echo 'image'.$z.'desc'; ?>" id="<?php echo 'image'.$z.'desc'; ?>" size="40" maxlength="255" value="" />	
 <br><input type="file" size="20" name="files[<?php echo $z; ?>]" value=""/>
 <?php  } ?>
       </div>

                    
   <?php  } ?>                  
    </td>
</tr> 
</table>          
</fieldset>

<?php 
echo $pane->endPanel();
echo $pane->startPanel( 'Description', 'panel3' );
?>
<table class="adminform"><tr><td>
<?php
		$editor = &JFactory::getEditor();		
echo $editor->display('description2', $this->datos->description2, '100%', '400', '60', '20');
?>
</td></tr></table>

<?php 
echo $pane->endPanel();
echo $pane->startPanel( 'Map', 'panel4' );
?>
<fieldset class="adminform">
				<legend><?php echo JText::_( 'Coordinates' ); ?></legend>


                
                
<table class="admintable"><tr><td>
				<tr>
						<td class="key">
							<label>
								<?php echo JText::_( 'Map Published' ); ?>:
							</label>
						</td>
						<td>
							<strong><?php echo JText::_( 'Change from Preferences' ); ?></strong>
						</td>
                         <td><?php echo JHTML::_('tooltip', JText::_( 'La publicación del mapa se configura desde Preferencias, saliendo de este formulario.')); ?></td>
					</tr> 
                
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Latitude' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="lat" id="lat" size="60" maxlength="255" value="<?php echo $this->datos->lat; ?>" />
						
					</td>
                    <td rowspan="2"><?php echo JHTML::_('tooltip', JText::_( 'Latitud y longitud necesarios para centrar el mapa y puntuar la propiedad.')); ?></td>
				</tr>
                
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Longitude' ); ?>:</label></td>
					<td >
                    <input class="text_area" type="text" name="lng" id="lng" size="60" maxlength="255" value="<?php echo $this->datos->lng; ?>" />
						
					</td>
                    
				</tr>
                 <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Get' ); ?> API Key:</label></td>
					<td >
                   <strong><a href="http://code.google.com/apis/maps/signup.html" target="_blank"><?php echo JText::_( 'GET' ); ?> API Key</a></strong>
						
					</td>
                    <td><?php echo JHTML::_('tooltip', JText::_( 'Otener API Key y agregarla en Preferencias para poder ver los mapas de Google.')); ?></td>
				</tr>
                
                
                <tr>
					<td class="key"><label for="user_id"><?php echo JText::_( 'Get' ).' '.JText::_( 'Coord' ); ?>:</label></td>
					<td >
                   <strong><a href="http://maps.google.com/maps?ll=40.418103,-3.713722&spn=0.015683,0.027466&z=15&key=ABQIAAAAFHktBEXrHnX108wOdzd3aBRcHlBTpYb_p9Hgr3VvSklsWletSxRtPnaBg-v2NXy9jFYSYS_aNOHN1Q&oi=map_misc&ct=api_logo" target="_blank" title="mapa" >  <?php echo JText::_( 'GET' ).' '.JText::_( 'COORD' ); ?></a></strong>
						
					</td>
                    <td><?php echo JHTML::_('tooltip', JText::_( 'Este link te muestra el mapa de google, busca la ubicación que desees y click boton derecho del mouse (centrar el mapa aquí), luego en la esquina inferior izquierda, donde dice "powered by google", con el mouse encima se lee la url donde estan las coordenada de la ubicación elegida, si clikeamos nos lleva a esa url de donde podemos copiar las coordenadas.si centramos la palabra "Madrid" del mapa, las coordenadas serán lat 40.416633, lgn -3.703465.(Aproximado).Suerte')); ?></td>
				</tr>
              
</table>
</fieldset>


<?php				            	

echo $pane->endPanel();
echo $pane->endPane();

?>
</div>


<div class="clr"></div>
<input type="hidden" name="option" value="com_properties" />
<input type="hidden" name="table" value="<?php echo $TableName; ?>" />
<input type="hidden" name="id" value="<?php echo $this->datos->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="property" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>

<!--<script type="text/javascript">slider();</script>-->
<?php
/*
echo '<pre>';
print_r($this->datos);
echo '</pre>';
*/
?>